﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<EnterpriseManagement.Models.BasicInformationModel>" %>

<h1>基本信息</h1>
<br />
<% if(ViewData.ContainsKey ("AlertMessage")){ %>
   <div style ="color:Red; 	font-weight:bold ;	font-size:large;"> <%: ViewData ["AlertMessage"] %></div>

<%} %>

       <%: Html.ValidationSummary(true, "帐户更新不成功。请更正错误并重试。") %>
      <% using (Ajax.BeginForm("BasicInformation", new AjaxOptions { UpdateTargetId = "maindispaly", HttpMethod = "POST" }))
         {%>
        <table id="tablenoframe" style =" margin:0 20%">
        <tr>
            <td class ="label"><%:Html.LabelFor (model=>model.EmployeeId) %></td>      
            <td class ="editor-label" ><%:Html.TextBoxFor(model => model.EmployeeId, new { @readonly  = "readonly" })%></td>      
        </tr>

        <tr>
            <td class ="label"><%:Html.LabelFor (model=>model.Name) %></td>   
             
            <td class ="editor-label">  <%:Html.TextBoxFor(model => model.Name)%>
            <%:Html.ValidationMessageFor (model=>model.Name) %>  
            </td>    
        </tr>

        <tr>
            <td class ="label"><%: Html.LabelFor(model => model.Birthday)%></td>    
            <td class ="editor-label">
            <%: Html.TextBoxFor(model => model.Birthday)%>
            <%: Html.ValidationMessageFor(model => model.Birthday)%>
            </td>
        </tr>  

        <tr>
        <td class ="label"><%: Html.LabelFor(model => model.Sex)%></td>
        <td class ="editor-label"><%: Html.TextBoxFor(model => model.Sex)%>
            <%: Html.ValidationMessageFor(model => model.Sex)%>
        </td>
        </tr>    

        <tr>
            <td class ="label"><%: Html.LabelFor(model => model.Email)%></td>
            <td class ="editor-field">      
            <%: Html.TextBoxFor(model => model.Email)%>
            <%: Html.ValidationMessageFor(model => model.Email)%>
            </td>
        </tr>

        <tr>
            <td class="label"><%: Html.LabelFor(model => model.GraduateSchool)%></td>
            <td class="editor-field">         
            <%: Html.TextBoxFor(model => model.GraduateSchool)%>
            <%: Html.ValidationMessageFor(model => model.GraduateSchool)%>
            </td> 
        </tr>
            
        <tr>
            <td class ="label"><%: Html.LabelFor(model => model.Major)%></td>
            <td class="editor-label">
            <%: Html.TextBoxFor(model => model.Major)%>
            <%: Html.ValidationMessageFor(model => model.Major)%>
            </td>
        </tr>

        <tr>
            <td class ="label"><%: Html.LabelFor(model => model.HiredDate)%></td>
            <td class="editor-label">
            <%: Html.TextBoxFor(model => model.HiredDate)%>
            <%: Html.ValidationMessageFor(model => model.HiredDate)%>
            </td>
        </tr>

        <tr>
            <td class ="label"><%: Html.LabelFor(model => model.Position)%></td>
            <td class="editor-label">
            <%: Html.TextBoxFor(model => model.Position)%>
            <%: Html.ValidationMessageFor(model => model.Position)%>
            </td>
        </tr>

        <tr>
            <td class ="label"><%: Html.LabelFor(model => model.Mobile)%></td>
            <td class="editor-label">
            <%: Html.TextBoxFor(model => model.Mobile)%>
            <%: Html.ValidationMessageFor(model => model.Mobile)%>
            </td>
        </tr>    

        <tr>
            <td class ="label"><%: Html.LabelFor(model => model.EmployeeStatus)%></td>
            <td class="editor-label">
            <%: Html.TextBoxFor(model => model.EmployeeStatus)%>
            <%: Html.ValidationMessageFor(model => model.EmployeeStatus)%>
            </td>
        </tr>    

        <tr>
            <td class ="label"><%: Html.LabelFor(model => model.LeaveDate)%></td>
            <td class="editor-label">
            <%: Html.TextBoxFor(model => model.LeaveDate)%>
            <%: Html.ValidationMessageFor(model => model.LeaveDate)%>
            </td>
        </tr>    
        <tr><td colspan ="2" align ="right"><input type="submit" value ="更新" /> </td></tr> 
        </table> 
        
        <%} %>
  
    